

<!DOCTYPE html>
<html lang="en">

<head>

  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="generator" content="HelpNDoc Personal Edition 7.3.0.348">
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <link rel="icon" href="favicon.ico"/>

  <title>Hex Editor</title>
  <meta name="description" content="" /> 
  <meta name="keywords" content="Hex Editor">



  

  <!-- Twitter Card data -->
  <meta name="twitter:card" content="summary">
  <meta name="twitter:title" content="Hex Editor">
  <meta name="twitter:description" content="">

  <!-- Open Graph data -->
  <meta property="og:title" content="Hex Editor" />
  <meta property="og:type" content="article" />
  <meta property="og:description" content="" />
  <meta property="og:site_name" content="FCEUX Help" /> 

  <!-- Bootstrap core CSS -->
  <link href="vendors/bootstrap-3.4.1/css/bootstrap.min.css" rel="stylesheet"/>

  <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
  <link href="vendors/bootstrap-3.4.1/css/ie10-viewport-bug-workaround.css" rel="stylesheet"/>

  <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
  <!--[if lt IE 9]>
      <script src="vendors/html5shiv-3.7.3/html5shiv.min.js"></script>
      <script src="vendors/respond-1.4.2/respond.min.js"></script>
    <![endif]-->

  <!-- JsTree styles -->
  <link href="vendors/jstree-3.3.10/themes/default/style.min.css" rel="stylesheet"/>

  <!-- Hnd styles -->
  <link href="css/layout.min.css" rel="stylesheet" />
  <link href="css/effects.min.css" rel="stylesheet" />
  <link href="css/theme-light-blue.min.css" rel="stylesheet" />
  <link href="css/print.min.css" rel="stylesheet" media="print" />
  <style type="text/css">nav { width: 250px} @media screen and (min-width:769px) { body.md-nav-expanded div#main { margin-left: 250px} body.md-nav-expanded header { padding-left: 264px} }</style>

  <!-- Content style -->
  <link href="css/hnd.content.css" rel="stylesheet" />

  



</head>

<body class="md-nav-expanded">



  <div id="skip-link">
    <a href="#main-content" class="element-invisible">Skip to main content</a>
  </div>

  <header class="headroom">
    <button class="hnd-toggle btn btn-default">
      <span class="sr-only">Toggle navigation</span>
      <span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>        
    </button>
    <h1>FCEUX Help</h1>
    
  </header>

  <nav id="panel-left" class="md-nav-expanded">
    <!-- Nav tabs -->
    <ul class="tab-tabs nav nav-tabs" role="tablist">
      <li id="nav-close"> 
        <button class="hnd-toggle btn btn-default">
          <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
        </button>
      </li>
      
	  
        <li role="presentation" class="tab active">
            <a href="#contents" id="tab-contents" aria-controls="contents" role="tab" data-toggle="tab">
                <i class="glyphicon glyphicon-list"></i>
                Contents
            </a>
        </li>
      
        <li role="presentation" class="tab">
            <a href="#index" id="tab-index" aria-controls="index" role="tab" data-toggle="tab">
                <i class="glyphicon glyphicon-asterisk"></i>
                Index
            </a>
        </li>
      
        <li role="presentation" class="tab">
            <a href="#search" id="tab-search" aria-controls="search" role="tab" data-toggle="tab">
                <i class="glyphicon glyphicon-search"></i>
                Search
            </a>
        </li>
      
    </ul>  <!-- /Nav tabs -->

    <!-- Tab panes -->
    <div class="tab-content">
	  
      <div role="tabpanel" class="tab-pane active" id="contents">
        <div id="toc" class="tree-container unselectable"
            data-url="_toc.json"
            data-openlvl="1"
        >
            
        </div>
      </div>  <!-- /contents-->
      
      <div role="tabpanel" class="tab-pane" id="index">
        <div id="keywords" class="tree-container unselectable"
            data-url="_keywords.json"
            data-openlvl="1"
        >
            
        </div>
      </div>  <!-- /index-->
      
      <div role="tabpanel" class="tab-pane" id="search">
        <div class="search-content">
          <div class="search-input">
            <form id="search-form">
              <div class="form-group">
                <div class="input-group">
                  <input type="text" class="form-control" id="input-search" name="input-search" placeholder="Search..." />
                  <span class="input-group-btn">
                    <button class="btn btn-default" type="submit">
                      <span class="glyphicon glyphicon-search" aria-hidden="true"></span>
                    </button>
                  </span>
                </div>
              </div>
            </form>
          </div>  <!-- /search-input -->
          <div class="search-result">
            <div id="search-info"></div>
            <div class="tree-container unselectable" id="search-tree"></div>
          </div>  <!-- /search-result -->
        </div>  <!-- /search-content -->
      </div>  <!-- /search-->
      
    </div>  <!-- /Tab panes -->

  </nav>

  <div id="main">

    <article>
        <div id="topic-content" class="container-fluid" 
		  data-hnd-id="HexEditor"
		  data-hnd-context="15"
		  data-hnd-title="Hex Editor"
		>
            
                <div class="navigation">
                    <ol class="breadcrumb">
                        <li><a href="Debug.html">Debug</a></li>
                    </ol>
                    <div class="nav-arrows">
                        <div class="btn-group btn-group" role="group"><a class="btn btn-default" href="Debug.html" title="Debug" role="button"><span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span></a><a class="btn btn-default" href="NameTableViewer.html" title="Name Table Viewer" role="button"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span></a><a class="btn btn-default" href="TraceLogger.html" title="Trace Logger" role="button"><span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span></a></div>
                    </div>
                </div> 
            

            <a id="main-content"></a>

            <h2>Hex Editor</h2>

            <div class="main-content">
                
<p class="rvps2"><span class="rvts22">十六进制编程(Hex Editor)</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts6">十六进制编程是一个非常强大功能,可以用来查看和编辑内存.</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts6">可以用来做很多事情.可以用来查看整个RAM和ROM在一个可放缩的窗口.key 可以方便的编辑游戏的RAM,PPU内存,甚至是ROM的数据.还可以`冻结`RAM,或者搜索数据,甚至从粘贴板复制和粘贴东西.另外,还支持table files,因此可以实时编辑游戏的文本内容,然后得到结果.</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts6">最基本的就是,可以与在运行的游戏中的RAM和ROM进行交互.</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts21">使用十六进制编辑器(Using the Hex Editor)</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts6">十六进制编程可以用来编辑4个主要的区域:</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts45">1.NES内存(1. NES MEMORY)</span></p>
<p class="rvps2"><span class="rvts6">可以编辑NES的整个内存空间从$0000到$FFFF.事实上只能修改RAM或者修改内存.不能修改ROM的数据,也就是($8000~$FFFF)的代码内容.这是因为大部分Mapper的寄存器分布在$8000~$FFFF空间;因此往此处写入数据会触发Mapper切换操作,导致游戏的崩溃.如果想要编辑ROM,只需要右击对应的地方,并选择"Go here in ROM file";将会进入可以编辑的区域.可以通过中击RAM来冻结RAM,或者右击菜单中选择相应功能.操作的结果将会添加作弊码到CheatList,可以从</span><a class="rvts77" href="CheatSearch.html">作弊控制台Cheat Console</a><span class="rvts6">查看.最后,右击可以用来快速添加一个可读写的断点到调试器.当添加断点到ROM($8000~$FFFF)的时候,十六进制编辑器将会统计bank的数量.</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts45">2.PPU内存(2. PPU MEMORY)</span></p>
<p class="rvps2"><span class="rvts6">可以用来直接查看和编辑PPU的内存 VRAM.</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts45">3. OAM内存(3. OAM MEMORY)</span></p>
<p class="rvps2"><span class="rvts6">还可以用来直接查看和编辑OAM每次(Sprite RAM).</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts45">4. ROM文件(4. THE ROM FILE)</span></p>
<p class="rvps2"><span class="rvts6">还可以在游戏运行时实时编辑ROM文件.使用Ctrl+Z撤销失误的操作.</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts6">十六进制编辑器还支持编辑(*.tbl),一直将bytes映射为text的文件.其中的每一行由"xx=y"格式的内容组成,其中"xx"表示十六进制,`y`则是对应的字符.另外还有一个扩展表示返回值`xx=ret` whereby pressing the Return key will enter that value into the ROM.另外还支持常见的文本编的复制修改搜索操作.</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts6">当编辑完成后,记得保存ROM文件,否则修改将会丢失.</span></p>
<p class="rvps2"><span class="rvts15"><br/></span></p>
<p class="rvps2"><span class="rvts21">为什么不能修改高出$8000?的内存呢</span></p>
<p class="rvps2"><span class="rvts15"><br/></span></p>
<p class="rvps2"><span class="rvts6">因为NES内存$8000-$FFFF是游戏代码所映射的地方. 在此输入编辑内容的时候,会立即写入对应的地址,导致意外的崩溃.大部分游戏使用了Mapper技术,一种用来切换bank的方式,因此可能触发bank切换,导致游戏崩溃.任务情况下,如此的做法并不能直接修改ROM文件.如果想要修改ROM文件,则右击需要编辑的内容并选择"Go here in the ROM file",这样可以进入真正的ROM编辑.</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts21">语法高亮(Highlighting)</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts6">Hex编辑器可以高亮部分内容用来与数据进行区分.</span></p>
<p class="rvps2"><span class="rvts6">通常大部分字节是黑色.</span></p>
<p class="rvps2"><span class="rvts6">标签部分使用绿色高亮<span class="rvts6">.</span></p>
<p class="rvps2"><span class="rvts6">冻结部分的内存地址使用蓝色高亮<span class="rvts6">.</span></p>
<p class="rvps2"><span class="rvts6">修改过的字节使用红色高亮<span class="rvts6">.</span></p>
<p class="rvps2"><span class="rvts6">如果启动</span><a class="rvts77" href="CodeDataLogger.html">Code/Data Logger</a><span class="rvts6">,被记录的字节也会被高亮:</span></p>
<p class="rvps2"><span class="rvts6">RPG片段 For PRG ROM segment:</span></p>
<p class="rvps2"><span class="rvts82">暗黄高亮 Dark-yellow</span><span class="rvts6"> - 代码部分the byte is code</span></p>
<p class="rvps2"><span class="rvts83">蓝色Blue</span><span class="rvts6"> - 数据部分the byte is data</span></p>
<p class="rvps2"><span class="rvts84">Cyan</span><span class="rvts6"> - 音频数据the byte is PCM audio data</span></p>
<p class="rvps2"><span class="rvts81">Green</span><span class="rvts6"> - the byte is both code and data</span></p>
<p class="rvps2"><span class="rvts6">CHR部分 For CHR ROM segment:</span></p>
<p class="rvps2"><span class="rvts85">Yellow</span><span class="rvts6"> - 被渲染的the byte was rendered</span></p>
<p class="rvps2"><span class="rvts86">Light-blue</span><span class="rvts6"> - 代码被读取过的 the byte was read programmatically</span></p>
<p class="rvps2"><span class="rvts87">Light-green</span><span class="rvts6"> - the byte was both rendered and read programmatically</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts21">高亮活动部分 Highlight Activity</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts6">Hex编辑器的这项功能可以高亮发送修改过的内容. This feature of the Hex Editor can draw your attention to bytes that changed their value since the last frame, or since the last update of Hex Editor window (if "Fade when paused" option is enabled).</span></p>
<p class="rvps2"><span class="rvts6">并且可以手动关闭If you don't need this feature, you can switch it off in the "Highlighting" submenu.</span></p>
<p class="rvps2"><span class="rvts6">也可以自定义此项功能You can customize this feature by changing "fading period".</span></p>
<p class="rvps2"><span class="rvts6">IMPORTANT NOTE: this feature does not track the actual changes of RAM. It works by simply comparing current values to previously displayed values of the same addresses. That's why the feature works with RAM/PPU/OAM/ROM as well.</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts6"></span><span class="rvts6"></span></p>
<p class="rvps4" style="clear: both;"><span class="rvts18">Created with the Personal Edition of HelpNDoc: </span><a class="rvts19" href="https://www.helpndoc.com">Easy EBook and documentation generator</a></p>

            </div>
            
            <div id="topic_footer"><div id="topic_footer_content">2020</div></div>
        </div>  <!-- /#topic-content -->
    </article>

    <footer></footer>

  </div>  <!-- /#main -->

  <div class="mask" data-toggle="sm-nav-expanded"></div>
  
  <!-- Modal -->
  <div class="modal fade" id="hndModal" tabindex="-1" role="dialog" aria-labelledby="hndModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <h4 class="modal-title" id="hndModalLabel"></h4>
        </div>
        <div class="modal-body">
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-primary modal-btn-close" data-dismiss="modal">Close</button>
        </div>
      </div>
    </div>
  </div>

  <!-- Splitter -->
  <div id="hnd-splitter" style="left: 250px"></div>  

  <!-- Scripts -->
  <script src="vendors/jquery-3.5.1/jquery.min.js"></script>
  <script src="vendors/bootstrap-3.4.1/js/bootstrap.min.js"></script>
  <script src="vendors/bootstrap-3.4.1/js/ie10-viewport-bug-workaround.js"></script>
  <script src="vendors/markjs-8.11.1/jquery.mark.min.js"></script>
  <script src="vendors/uri-1.19.2/uri.min.js"></script>
  <script src="vendors/imageMapResizer-1.0.10/imageMapResizer.min.js"></script>
  <script src="vendors/headroom-0.11.0/headroom.min.js"></script>
  <script src="vendors/jstree-3.3.10/jstree.min.js"></script>  
  <script src="vendors/interactjs-1.9.22/interact.min.js"></script>  

  <!-- HelpNDoc scripts -->
  <script src="js/polyfill.object.min.js"></script>
  <script src="_translations.js"></script>
  <script src="js/hndsd.min.js"></script>
  <script src="js/hndse.min.js"></script>
  <script src="js/app.min.js"></script>

  <!-- Init script -->
  <script>
    $(function() {
      // Create the app
      var app = new Hnd.App();
      // Update translations
      hnd_ut(app);
	  // Instanciate imageMapResizer
	  imageMapResize();
	  // Custom JS
	  
      // Boot the app
      app.Boot();
    });
  </script>



</body>

</html>

